//
//  UITableView+Extension.m
//  BaseProject
//
//  Created by itzhaolei on 2024/7/13.
//

#import "UITableView+Extension.h"

@implementation UITableView(Extension)

/// 清理版本差异化
- (void)clear {
    self.showsVerticalScrollIndicator = NO;
    self.separatorStyle = NO;
    
    //ios11 适配
    if (@available(iOS 11.0, *)) {
        self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
        self.scrollIndicatorInsets = self.contentInset;
    }
    
    self.estimatedRowHeight = CGFLOAT_MIN;
    self.estimatedSectionHeaderHeight = CGFLOAT_MIN;
    self.estimatedSectionHeaderHeight = CGFLOAT_MIN;
    self.rowHeight = UITableViewAutomaticDimension;
    self.sectionHeaderHeight = UITableViewAutomaticDimension;
    self.sectionFooterHeight = UITableViewAutomaticDimension;
    
    //ios15 适配
    if (@available(iOS 15.0, *)) {
        self.sectionHeaderTopPadding = CGFLOAT_MIN;
    }
}

@end
